{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "f6f90e30-d79f-45e2-af70-369456e5af4f",
   "metadata": {},
   "outputs": [],
   "source": [
    "from array import array"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "8f08a3a5-7867-4ffe-8ab3-7652fd1caf2c",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "array('i', [1, 2, 3, 4, 5])\n",
      "3\n",
      "array('i', [1, 2, 10, 4, 5])\n"
     ]
    }
   ],
   "source": [
    "arr = array('i', [1,2,3,4,5])\n",
    "print(arr)\n",
    "print(arr[2])\n",
    "arr[2] = 10\n",
    "print(arr)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "4a9523bc-8bd1-4ed1-945c-84b05dfca608",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1\n",
      "2\n",
      "10\n",
      "4\n",
      "5\n"
     ]
    }
   ],
   "source": [
    "print(*arr, sep='\\n')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "21322d3f-6b6e-4f89-93c2-21bade790df2",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python (myenv)",
   "language": "python",
   "name": "myenv"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
